WIP: feat/webhook-cleanup-39c3 #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/webhook-cleanup-39c3"
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?
@ -35,3 +40,1 @@[voctoweb]# e.g. https://exmaple.com/api/ - with trailing slashapi_url = "<voctoweb api url>"enable_default = trueThis is no longer used, use
[defaults]below@ -0,0 +17,4 @@tracker = TrackerClient()project = '39c3'Do we really need to have one-shot scripts like these in this repository?
If yes, it should atleast take the relevant information fron the config file and command line options instead of hard-coding them.
Yeah, that was the idea – that was one of the reasons why this was still marked as draft
@ -0,0 +51,4 @@print(json.dumps(webhook._get_json(ticket), indent=2))exit()What does this do, and why do we have code after this?
@ -0,0 +72,4 @@if __name__ == "__main__":sync_tracker_with_hub()In general, this script looks like a WIP commit, we should try to not have that in the main branch.
@ -104,0 +105,4 @@if not config:config = ticket.configif not voctoweb_filename:voctoweb_filename = ticket.filenameAre these identical? If yes, we can just remove passing this in. If not, it's not a great fallback value.
Same for
languagebelow.for the default case they are identical, as far as I understand the code there should be an option to overwrite the default filename for specific cases e.g. single-language MP4s
@ -129,2 +137,2 @@).split("/", 2)thumb_url = f"https:/{thumb_path[1]}/media/{thumb_path[2]}")tpc = thumb_path.split("/", 2)We should aim for readable variables in newly added code.
tpcis not very readable.@ -105,2 +106,4 @@return Falsedef __str__(self):return super().__str__() + " " +json.dumps(vars(self), indent=2)Dumping a big json blob is not exactly whay i would expect in
__str__(). Ideally, put the JSON into a new method calledto_json()or something like that.@ -43,3 +44,3 @@from tools.thumbnails import ThumbnailGeneratorMY_PATH = os.path.abspath(os.path.dirname(__file__))MY_PATH = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))This was intentional. We should encourage users to use environment variables instead.
@ -92,3 +94,3 @@self.ticket_type = "recording"self.to_state = "recording"else:elif self.worker_type != "other":What is an 'other' worker?
any other worker which does not download, or publish a ticket. E.g. relive, or fixup scripts like the one we are adding in this PR.
DRAFT: feat/webhook-cleanup-39c3to WIP: DRAFT: feat/webhook-cleanup-39c3WIP: DRAFT: feat/webhook-cleanup-39c3to WIP: feat/webhook-cleanup-39c3View 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.