mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
22 lines
446 B
Python
22 lines
446 B
Python
"""
|
|
Requires:
|
|
none
|
|
|
|
Provides:
|
|
context -> machine (str)
|
|
"""
|
|
|
|
import pyblish.api
|
|
|
|
|
|
class CollectMachineName(pyblish.api.ContextPlugin):
|
|
label = "Local Machine Name"
|
|
order = pyblish.api.CollectorOrder - 0.5
|
|
hosts = ["*"]
|
|
|
|
def process(self, context):
|
|
import socket
|
|
|
|
machine_name = socket.gethostname()
|
|
self.log.info("Machine name: %s" % machine_name)
|
|
context.data["machine"] = machine_name
|