Skip to content

Commit

Permalink
disable trigger if executor is running
Browse files Browse the repository at this point in the history
  • Loading branch information
divi255 committed Aug 10, 2019
1 parent 0d36eac commit b530d4a
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion atasker/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__author__ = "Altertech Group, https://www.altertech.com/"
__copyright__ = "Copyright (C) 2018-2019 Altertech Group"
__license__ = "Apache License 2.0"
__version__ = "0.2.10"
__version__ = "0.2.11"

from atasker.supervisor import TaskSupervisor
from atasker.supervisor import TASK_LOW
Expand Down
2 changes: 1 addition & 1 deletion atasker/co.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__author__ = "Altertech Group, https://www.altertech.com/"
__copyright__ = "Copyright (C) 2018-2019 Altertech Group"
__license__ = "Apache License 2.0"
__version__ = "0.2.10"
__version__ = "0.2.11"

from atasker import task_supervisor

Expand Down
2 changes: 1 addition & 1 deletion atasker/f.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__author__ = "Altertech Group, https://www.altertech.com/"
__copyright__ = "Copyright (C) 2018-2019 Altertech Group"
__license__ = "Apache License 2.0"
__version__ = "0.2.10"
__version__ = "0.2.11"

import traceback
import threading
Expand Down
2 changes: 1 addition & 1 deletion atasker/supervisor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__author__ = "Altertech Group, https://www.altertech.com/"
__copyright__ = "Copyright (C) 2018-2019 Altertech Group"
__license__ = "Apache License 2.0"
__version__ = "0.2.10"
__version__ = "0.2.11"

import threading
import multiprocessing
Expand Down
2 changes: 1 addition & 1 deletion atasker/threads.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__author__ = "Altertech Group, https://www.altertech.com/"
__copyright__ = "Copyright (C) 2018-2019 Altertech Group"
__license__ = "Apache License 2.0"
__version__ = "0.2.10"
__version__ = "0.2.11"

import threading
import time
Expand Down
4 changes: 3 additions & 1 deletion atasker/workers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__author__ = "Altertech Group, https://www.altertech.com/"
__copyright__ = "Copyright (C) 2018-2019 Altertech Group"
__license__ = "Apache License 2.0"
__version__ = "0.2.10"
__version__ = "0.2.11"

import threading
import logging
Expand Down Expand Up @@ -380,6 +380,8 @@ def get_queue_obj(self):
class BackgroundEventWorker(BackgroundAsyncWorker):

def trigger(self):
if self._current_executor:
return
asyncio.run_coroutine_threadsafe(
self._set_event(), loop=self.supervisor.event_loop)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.2.10"
__version__ = "0.2.11"

import setuptools

Expand Down
2 changes: 1 addition & 1 deletion tests/mp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__author__ = "Altertech Group, https://www.altertech.com/"
__copyright__ = "Copyright (C) 2018-2019 Altertech Group"
__license__ = "Apache License 2.0"
__version__ = "0.2.10"
__version__ = "0.2.11"

def test(*args, **kwargs):
print('test mp method {} {}'.format(args, kwargs))
Expand Down
2 changes: 1 addition & 1 deletion tests/mpworker.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__author__ = "Altertech Group, https://www.altertech.com/"
__copyright__ = "Copyright (C) 2018-2019 Altertech Group"
__license__ = "Apache License 2.0"
__version__ = "0.2.10"
__version__ = "0.2.11"

from atasker import BackgroundIntervalWorker

Expand Down
2 changes: 1 addition & 1 deletion tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__author__ = "Altertech Group, https://www.altertech.com/"
__copyright__ = "Copyright (C) 2018-2019 Altertech Group"
__license__ = "Apache License 2.0"
__version__ = "0.2.10"
__version__ = "0.2.11"

from pathlib import Path

Expand Down

0 comments on commit b530d4a

Please sign in to comment.