def __init__(self, scope): super().__init__(scope) self.publishers = None self.job = None self.data = None self.request = None self.requestSerializer = None self.logger = get_module_logger(type(self).__name__)
from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.models import User from django.contrib.postgres.fields.array import ArrayField from django.contrib.postgres.fields.jsonb import JSONField from django.db import models # Create your models here. from larvik.fields import DimsField, ShapeField, StoreFileField from larvik.logging import get_module_logger from larvik.managers import LarvikArrayManager from larvik.storage.default import get_default_storagemode from larvik.storage.local import LocalStorage, ZarrStorage from larvik.storage.s3 import S3Storage logger = get_module_logger(__name__) get_user_model() class LarvikJob(models.Model): statuscode = models.IntegerField(null=True, blank=True) statusmessage = models.CharField(max_length=500, null=True, blank=True) settings = models.CharField(max_length=1000) # jsondecoded creator = models.ForeignKey(User, on_delete=models.CASCADE) nodeid = models.CharField(max_length=400, null=True, blank=True) class Meta: abstract = True def _repr_html_(self):
def __init__(self, **kwargs): self.logger = get_module_logger(type(self).__name__) super().__init__(**kwargs)
CONSUMERS = {} ISDISCOVER = False def setDiscover(mode): global ISDISCOVER ISDISCOVER = mode NODES = {} NonePath = "NO PATH APPLICABLE" logger = get_module_logger(__file__) def createUniqeNodeName(channel=None): """This function generate 10 character long hash""" hash = hashlib.sha1() salt = channel if channel is not None else str(uuid.uuid4()) hash.update(salt.encode('utf-8')) return hash.hexdigest() class NodeType(object): inputs = [] outputs = [] name = None path = None