Skip to content

JobType for generic jobs generated with assembly version #60

Open
dopusteam opened this issue Mar 21, 2023 · 0 comments
Open

JobType for generic jobs generated with assembly version #60

dopusteam opened this issue Mar 21, 2023 · 0 comments

Comments

@dopusteam
Copy link

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.

@dopusteam dopusteam changed the title Name of generic jobs generated with assembly version JobType for generic jobs generated with assembly version Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant