Skip to content

Conversation

@archang31
Copy link

Small change to fix the app context error:

ctfd-1 | ERROR [apscheduler.executors.default] Job "ContainerManager.wrapper_run_command (trigger: interval[0:00:05], next run at: 2025-11-09 14:01:28 UTC)" raised an exception 
ctfd-1 | Traceback (most recent call last): 
ctfd-1 | File "/opt/venv/lib/python3.11/site-packages/apscheduler/executors/base.py", line 131, in run_job ctfd-1 | retval = job.func(*job.args, **job.kwargs) 
ctfd-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
ctfd-1 | File "/opt/CTFd/CTFd/plugins/containers/container_manager.py", line 127, in wrapper_run_command 
ctfd-1 | return func(self, *args, **kwargs) ctfd-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
ctfd-1 | File "/opt/CTFd/CTFd/plugins/containers/container_manager.py", line 146, in kill_expired_containers 
ctfd-1 | with app.app_context(): 
ctfd-1 | ^^^^^^^^^^^^^^^^^ 
ctfd-1 | TypeError: Flask.app_context() missing 1 required positional argument: 'self'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants