icmp ping #1
No reviewers
Labels
No labels
bug
duplicate
enhancement
fast issue
help wanted
invalid
long issue
pain 🫠
question
web world
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: adm/pingpong#1
Loading…
Reference in a new issue
No description provided.
Delete branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
perform basic icmp ping
@ -0,0 +15,4 @@state = self.db.create_state(el['id'])[0]open_incident = self.db.get_open_incident(el['id'])ping_data = ping(el['ipaddr'])best_effort = sorted(ping_data, key=lambda x: x.time_elapsed_ms)[0]use avg response time instead of fastest?
Makes sense to me
It all makes more or less sense to me. Unfortunately I'm not a Python expert so I'm not entirely sure about some things but I don't have time to check them now.
What I would add to the repo is the structure of the db (which you sent me on telegram). Also two things I would do would be:
@ -0,0 +39,4 @@self.cur.execute("""INSERT INTO incident (state_id, error)VALUES (%s,%s) RETURNING *;""", *argv)self.conn.commit()return self.cur.fetchall()Don't you have a way here to just take the state you just created? It seems pointless to me to take them all since you're only interested in the latest created anyway
I thought about this but I don't know if it fits well here. I think it's better to put it in ansible repo where the database is created.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.