1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-12 16:18:07 -05:00

Add server version to master api

Add IsEvadedOffense to EFPenalty
Fix remote log reading in not Windows
This commit is contained in:
RaidMax
2018-12-16 21:16:56 -06:00
parent 4067217830
commit 9f92b64135
1676 changed files with 287228 additions and 66 deletions

View File

@ -0,0 +1,25 @@
from __future__ import absolute_import
from apscheduler.executors.base import BaseExecutor, run_job
class TwistedExecutor(BaseExecutor):
"""
Runs jobs in the reactor's thread pool.
Plugin alias: ``twisted``
"""
def start(self, scheduler, alias):
super(TwistedExecutor, self).start(scheduler, alias)
self._reactor = scheduler._reactor
def _do_submit_job(self, job, run_times):
def callback(success, result):
if success:
self._run_job_success(job.id, result)
else:
self._run_job_error(job.id, result.value, result.tb)
self._reactor.getThreadPool().callInThreadWithCallback(
callback, run_job, job, job._jobstore_alias, run_times, self._logger.name)