Skip to content

JobType for generic jobs generated with assembly version #60

Description

@dopusteam

There is such code in JobDb

jobDb.JobType = jobMetadata.JobType.AssemblyQualifiedNameWithoutVersion();

where
AssemblyQualifiedNameWithoutVersion looks like

public static string AssemblyQualifiedNameWithoutVersion(this Type type) => type.FullName + ", " + type.GetTypeInfo().Assembly.GetName().Name;

When we use generic job, we get name with version because type.FullName returns something like

GenericJob`1[[GenericType, MyAssembly, Version=0.0.0.1, Culture=neutral, PublicKeyToken=null]]

and result JobType for generic type looks like

GenericJob`1[[GenericType, MyAssembly, Version=0.0.0.1, Culture=neutral, PublicKeyToken=null]], MyAssembly

As a result, after updating assembly version horarium will not be able to handle jobs created in previous version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions