This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1888 from tokejepsen/feature/disregard_publishing…
…_time
- Loading branch information
Showing
4 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import pyblish.api | ||
|
||
from openpype.api import get_system_settings | ||
from openpype.lib import change_timer_to_current_context | ||
|
||
|
||
class StartTimer(pyblish.api.ContextPlugin): | ||
label = "Start Timer" | ||
order = pyblish.api.IntegratorOrder + 1 | ||
hosts = ["*"] | ||
|
||
def process(self, context): | ||
modules_settings = get_system_settings()["modules"] | ||
if modules_settings["timers_manager"]["disregard_publishing"]: | ||
change_timer_to_current_context() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import os | ||
import requests | ||
|
||
import pyblish.api | ||
|
||
from openpype.api import get_system_settings | ||
|
||
|
||
class StopTimer(pyblish.api.ContextPlugin): | ||
label = "Stop Timer" | ||
order = pyblish.api.ExtractorOrder - 0.5 | ||
hosts = ["*"] | ||
|
||
def process(self, context): | ||
modules_settings = get_system_settings()["modules"] | ||
if modules_settings["timers_manager"]["disregard_publishing"]: | ||
webserver_url = os.environ.get("OPENPYPE_WEBSERVER_URL") | ||
rest_api_url = "{}/timers_manager/stop_timer".format(webserver_url) | ||
requests.post(rest_api_url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters